<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>



<html>
<head>
    <title></title>
    <style type="text/css">
        .style1
        {
            width: 203px;
        }
        #Text9
        {
            height: 50px;
            width: 500px;
        }
        #Text10
        {
            width: 500px;
            height: 70px;
        }
        #Text11
        {
            height: 50px;
            width: 500px;
        }
        .style2
        {
            width: 100px;
        }
    </style>
</head>
<body>
<%@ include file="head.jsp"%>
<form action="/CA_Project/StaffDetailPage" method=post>
<c:choose>
	<c:when test = "${LeaveInfo._status == 'Pending'}">
    <table style="width:100%;">
        <tr>
            <td class="style1">
                ${userInfo._name } Applicant<br />
                <input id="Text1" type="text" name = "uesrname" value = '${LeaveInfo._userName }'/></td>
            <td>
                Approving Manager<br />
                <input id="Text2" type="text" name = "approvingmanager" value = '${Manager._name }' readonly = "readonly"/></td>
            <td>
                Applicantion 
                Date<br />
                <input id="Text3" type="text" name = "applicationdate"  value = '${LeaveInfo._applicationDate }' readonly = "readonly"/></td>
            <td>
                Duration<br />
                <input id="Text4" type="text" /></td>
        </tr>
        <tr>
            <td class="style1">
                LeaveType<br />
                <input id="Text5" type="text" name = "leavetype" value = '${LeaveInfo._leaveType }' /></td>
            <td>
                Status<br />
                <input id="Text6" type="text" name = "status" value = '${LeaveInfo._status } 'readonly = "readonly"/></td>
            <td>
                From<br />
                <input id="Text7" type="text" name = "startdate" value = '${LeaveInfo._startDate }'/>
                <input id="Text7" type="text" name = "startdateHalf" value = '${LeaveInfo._startDateHalfDay }'/></td>
            <td>
                To<br />
                <input id="Text8" type="text" name = "enddate" value = '${LeaveInfo._endDate }'/>
                <input id="Text8" type="text" name = "enddateHalf" value = '${LeaveInfo._endDateHalfDay }'/></td>
        </tr>
        <tr>
            <table style="width: 100%;">
                <tr>
                    <td>
                        Work Dissemination:<br />
                        <input id="Text9" type="text" name = "workdiss" value = '${LeaveInfo._workDissemination }'/></td>

                </tr>
                <tr>
                    <td>
                        Reason:<br />
                        <input id="Text10" type="text" name = "reason" value = '${LeaveInfo._reason }'/></td>

                </tr>

     

            </table>
        </tr>

        <table style="width: 100%;">
            <tr>
                <td class="style2">
                    &nbsp;
                    <input id="Update" name = "Update" type="submit" value="Update" />
                    </td>
	                 <td class="style2">
	                    &nbsp;
	                    <input id="Delete" name = "Delete" type="submit" value="Delete"  /></td>               	
           		

                <td class="style2">
                    &nbsp;
                    <input id="Cancel" name = "Cancel" type="submit" value="Cancel"  disabled = "disabled" /></td>
              
            </tr>

        </table>
    </table>
	</c:when>
	<c:when test = "${LeaveInfo._status == 'Approved'}">
	    <table style="width:100%;">
        <tr>
            <td class="style1">
                ${userInfo._name } Applicant<br />
                <input id="Text1" type="text"  name = "uesrname" value = '${LeaveInfo._userName }' readonly = "readonly"/></td>
            <td>
                Approving Manager<br />
                <input id="Text2" type="text"  name = "approvingmanager" value = '${Manager._name }' readonly = "readonly"/></td>
            <td>
                Applicantion 
                Date<br />
                <input id="Text3" type="text" name = "applicationdate" value = '${LeaveInfo._applicationDate }'  readonly = "readonly"/></td>
            <td>
                Duration<br />
                <input id="Text4" type="text" /></td>
        </tr>
        <tr>
            <td class="style1">
                LeaveType<br />
                <input id="Text5" type="text"  name = "leavetype" value = '${LeaveInfo._leaveType }'  readonly = "readonly"/></td>
            <td>
                Status<br />
                <input id="Text6" type="text"name = "status" value = '${LeaveInfo._status }' readonly = "readonly"/></td>
            <td>
                From<br />
                <input id="Text7" type="text" name = "startdate" value = '${LeaveInfo._startDate }' readonly = "readonly"/>
                                <input id="Text7" type="text" name = "startdateHalf" value = '${LeaveInfo._startDateHalfDay }' readonly = "readonly"/></td>
            <td>
                To<br />
                <input id="Text8" type="text"  name = "enddate"  value = '${LeaveInfo._endDate }' readonly = "readonly" readonly = "readonly"/>
                                <input id="Text7" type="text" name = "enddateHalf" value = '${LeaveInfo._endDateHalfDay }'/></td>
        </tr>
        <tr>
            <table style="width: 100%;">
                <tr>
                    <td>
                        Work Dissemination:<br />
                        <input id="Text9" type="text" name = "workdiss"  value = '${LeaveInfo._workDissemination }' readonly = "readonly"/></td>

                </tr>
                <tr>
                    <td>
                        Reason:<br />
                        <input id="Text10" type="text" name = "reason"  value = '${LeaveInfo._reason }' readonly = "readonly"/></td>

                </tr>


            </table>
        </tr>

        <table style="width: 100%;">
            <tr>
                <td class="style2">
                    &nbsp;
                    <input id="Update" name = "Update" type="submit" value="Update" disabled = "disabled"/>
                    </td>
	                 <td class="style2">
	                    &nbsp;
	                    <input id="Delete" name = "Delete" type="submit" value="Delete"  disabled = "disabled"/></td>               	
          		

                <td class="style2">
                    &nbsp;
                    <input id="Cancel" name = "Cancel" type="submit" value="Cancel" /></td>
            
            </tr>

        </table>
    </table>
	</c:when>
	<c:otherwise>
	    <table style="width:100%;">
        <tr>
            <td class="style1">
                ${userInfo._name } Applicant<br />
                <input id="Text1" type="text" name = "uesrname" value = '${LeaveInfo._userName }' readonly = "readonly"/></td>
            <td>
                Approving Manager<br />
                <input id="Text2" type="text" name = "approvingmanager" value = '${Manager._name }' readonly = "readonly"/></td>
            <td>
                Applicantion 
                Date<br />
                <input id="Text3" type="text" name = "applicationdate" value = '${LeaveInfo._applicationDate }' readonly = "readonly" /></td>
            <td>
                Duration<br />
                <input id="Text4" type="text" /></td>
        </tr>
        <tr>
            <td class="style1">
                LeaveType<br />
                <input id="Text5" type="text" name = "leavetype" value = '${LeaveInfo._leaveType }'  readonly = "readonly"/></td>
            <td>
                Status<br />
                <input id="Text6" type="text"name = "status" value = '${LeaveInfo._status }' readonly = "readonly"/></td>
            <td>
                From<br />
                <input id="Text7" type="text" name = "startdate" value = '${LeaveInfo._startDate }' readonly = "readonly"/>
                                                <input id="Text7" type="text" name = "startdateHalf" value = '${LeaveInfo._startDateHalfDay }' readonly = "readonly"/></td>
            <td>
                To<br />
                <input id="Text8" type="text"  name = "enddate"  value = '${LeaveInfo._endDate }' readonly = "readonly"/>
                                                <input id="Text7" type="text" name = "enddateHalf" value = '${LeaveInfo._endDateHalfDay }' readonly = "readonly"/></td>
        </tr>
        <tr>
            <table style="width: 100%;">
                <tr>
                    <td>
                        Work Dissemination:<br />
                        <input id="Text9" type="text" name = "workdiss" value = '${LeaveInfo._workDissemination }' readonly = "readonly"/></td>

                </tr>
                <tr>
                    <td>
                        Reason:<br />
                        <input id="Text10" type="text"  name = "reason"  value = '${LeaveInfo._reason }' readonly = "readonly"/></td>

                </tr>



            </table>
        </tr>

        <table style="width: 100%;">
            <tr>
                <td class="style2">
                    &nbsp;
                    <input id="Update" name = "Update" type="submit" value="Update"  disabled = "disabled"/>
                    </td>
	                 <td class="style2">
	                    &nbsp;
	                    <input id="Delete" name = "Delete" type="submit" value="Delete"   disabled = "disabled"/></td>               	
          		

                <td class="style2">
                    &nbsp;
                    <input id="Cancel" name = "Cancel" type="submit" value="Cancel"  disabled = "disabled"/></td>
            
            </tr>

        </table>
    </table>
	</c:otherwise>
</c:choose>	

</form>
</body>
</html>
